<%@ taglib prefix="C" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="zh">
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path;
%>

<head>
    <meta charset="utf-8"/>
    <title>保险代理后台管理系统</title>
    <meta
            content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
            name="viewport"/>
    <!-- ================== BEGIN BASE CSS STYLE ================== -->
    <jsp:include page="../common/header.jsp"></jsp:include>
    <%@include file="../common/taglib.jsp" %>
    <!-- ================== END BASE CSS STYLE ================== -->
    <style>
        .dropdown-menu {
            position: absolute;
            top: 100%;
            left: 0;
            z-index: 1000;
            display: none;
            float: left;
            min-width: 160px;
            padding: 5px 0;
            margin: 2px 0 0;
            font-size: 14px;
            text-align: left;
            list-style: none;
            background-color: #fff;
            -webkit-background-clip: padding-box;
            background-clip: padding-box;
            border: 1px solid #ccc;
            border: 1px solid rgba(0, 0, 0, .15);
            border-radius: 4px;
        }
    </style>
</head>
<body>
<jsp:useBean id="currTime" class="java.util.Date"/>
<!-- begin #page-loader -->
<div id="page-loader" class="fade in">
    <span class="spinner"></span>
</div>
<!-- end #page-loader -->

<!-- begin #page-container -->
<div id="page-container"
     class="fade page-sidebar-fixed page-header-fixed">
    <jsp:include page="../common/top.jsp"/>
    <jsp:include page="../common/sitebar.jsp"/>
    <div class="sidebar-bg"></div>
    <div id="content" class="content">
        <div class="row">
            <div class="col-md-12">
                <div class="panel panel-inverse">
                    <section class="pad-top-10 pad-bottom-20">
                        <input type="text" id="tabType" value="${tabType}" hidden>
                        <ul id="myTab" class="nav nav-tabs">
                            <li class="active"><a href="#tab1" onclick="showInsurerOrder()" id="tab" data-toggle="tab">保险公司</a>
                            </li>
                            <li><a href="#tab2" onclick="showChannelOrder()" data-toggle="tab">渠道</a></li>
                            <li><a href="#tab3" id="perfect" onclick="showAddTab()" data-toggle="tab">保单详情</a></li>
                            <li><a href="#tab4" onclick="showAddTab()" data-toggle="tab">审核</a></li>
                            <li><a href="#tab5" onclick="showAddTab()" data-toggle="tab">支付</a></li>
                            <li><a href="#tab6" onclick="showAddTab()" data-toggle="tab">完善保单</a></li>
                            <li class="link-down">
                                <span data-toggle="modal" data-target="#needpaid">
                                    <i class="fa fa-download"></i>&nbsp;
                                    下载列表
                                </span>
                            </li>
                        </ul>
                        <div class="tab-content">
                            <!-- 公司列表 -->
                            <div id="tab1" class="tab-pane fade active in">
                                <section>
                                    <form class="form-inline p-t-10 p-b-10">
                                        <div class="form-group m-r-20">
                                            <label>保险公司：</label>
                                            <select class="form-control" id="insurerId1" style="width: 140px;">
                                                <option value="0">请选择</option>
                                                <c:forEach items="${insurerList }" var="insurer">
                                                    <option value="${insurer.tid }">${insurer.name }</option>
                                                </c:forEach>
                                            </select>
                                        </div>
                                        <div class="form-group m-r-20">
                                            <label>车牌号：</label>
                                            <input type="text" class="form-control"
                                                   id="plateNum1"
                                                   style="width: 200px;"
                                                   name="insurant">
                                        </div>
                                        <div class="form-group" style="position: relative;">
                                            <label>渠道：</label>
                                            <input type="text" id="channel" name="channel"
                                                   style="width: 200px;"
                                                   class="form-control" placeholder=""/>
                                            <input type="hidden" name="channelId" id="channelId">
                                            <ul id="ch" class="dropdown-menu"
                                                style="width: 200px;overflow: auto;margin-left: 46px;">
                                            </ul>
                                        </div>
                                        <input type="hidden" name="message" id="message">
                                        <div class="p-t-10">
                                            <div class="form-group m-r-20">
                                                <label>付款主体：</label>
                                                <select class="form-control"
                                                        style="width: 140px;"
                                                        id="themeKey">
                                                    <option value="0">请选择</option>
                                                    <c:forEach var="theme" items="${payThemeList }">
                                                        <option value="${theme.riskKey}">${theme.riskValue}</option>
                                                    </c:forEach>
                                                </select>
                                            </div>
                                            <div class="form-group m-r-10">
                                                <label>&emsp;状态：</label>
                                                <div class="input-group input-daterange">
                                                    <select class="form-control"
                                                            style="width: 200px;"
                                                            id="orderStatus">
                                                        <option value="0">请选择</option>
                                                        <c:forEach var="orderStatus"
                                                                   items="${orderStatusList }">
                                                            <option value="${orderStatus.riskKey }">${orderStatus.riskValue }</option>
                                                        </c:forEach>
                                                    </select>
                                                </div>
                                            </div>
                                            <button type="button" class="btn btn-primary"
                                                    onclick="searchInsurer()">
                                                查询
                                            </button>
                                        </div>
                                    </form>
                                    <table id="insurerList"
                                           class="table table-striped table-bordered"
                                           style="word-break: break-all; word-wrap: break-word">
                                        <thead>
                                        <tr>
                                            <th>编号</th>
                                            <th>保险公司</th>
                                            <th>付款主体</th>
                                            <th>渠道</th>
                                            <th>联系电话</th>
                                            <th>被保险人</th>
                                            <th>被保险人证件号</th>
                                            <th>车牌号</th>
                                            <th>车主姓名</th>
                                            <th>险种</th>
                                            <th>商业险保费(元)</th>
                                            <th>交强险保费(元)</th>
                                            <th>车船税(元)</th>
                                            <th>全保费(元)</th>
                                            <th>下单日期</th>
                                            <th>状态</th>
                                            <th>操作</th>
                                        </tr>
                                        </thead>
                                    </table>
                                </section>
                            </div>
                            <!-- 渠道列表 -->
                            <div id="tab2" class="tab-pane fade">
                                <section>
                                    <form class="form-inline p-t-10 p-b-10">
                                        <div class="form-group m-r-20">
                                            <label>保险公司：</label>
                                            <select class="form-control"
                                                    style="width:181px;"
                                                    id="insurerId2">
                                                <option value="0">请选择</option>
                                                <c:forEach items="${insurerList }" var="insurer">
                                                    <option value="${insurer.tid }">${insurer.name }</option>
                                                </c:forEach>
                                            </select>
                                        </div>
                                        <div class="form-group m-r-20">
                                            <label>车牌号：</label>
                                            <input type="text" class="form-control"
                                                   style="width:181px;"
                                                   id="plateNum2"
                                                   name="insurant">
                                        </div>
                                        <div class="form-group m-r-20" style="position: relative">
                                            <label>渠道：</label>
                                            <input type="text" id="channels" name="channel"
                                                   style="width: 200px;"
                                                   class="form-control" placeholder=""/>
                                            <ul id="chs" class="dropdown-menu"
                                                style="overflow: auto;margin-left: 45px;width: 200px;">
                                            </ul>
                                        </div>
                                        <div class="p-t-10">
                                            <div class="form-group m-r-10">
                                                <label>出单日期：</label>
                                                <div class="input-group">
                                                    <input type="text" class="form-control datepicker-default"
                                                           id="insurantStartDate"
                                                           name="insurantStartDate">
                                                    <div class="input-group-addon">至</div>
                                                    <input type="text" class="form-control datepicker-default"
                                                           id="insurantEndDate"
                                                           name="insurantEndDate">
                                                </div>
                                            </div>
                                            <button type="button" class="btn btn-primary"
                                                    onclick="searchChannel()">
                                                查询
                                            </button>
                                        </div>
                                    </form>
                                    <%-- <form class="form-horizontal">
                                         <div class="form-group">
                                             <label class="col-md-1 control-label" style="width: 110px;"></label>
                                             <div class="col-md-2">

                                             </div>
                                             <label class="col-md-1 control-label"></label>
                                             <div class="col-md-2">

                                             </div>
                                             <label class="col-md-1 control-label" style="width: 110px;"></label>
                                             <div class="col-md-2">

                                             </div>
                                         </div>
                                         <div class="form-group">
                                             <label class="col-md-1 control-label" style="width: 110px;"></label>
                                             <div class="col-md-2">

                                             </div>
                                             <div class="col-md-2">

                                             </div>
                                         </div>
                                     </form>--%>
                                    <table id="channelList"
                                           class="table table-striped table-bordered"
                                           style="word-break: break-all; word-wrap: break-word">
                                        <thead>
                                        <tr>
                                            <th>保单号</th>
                                            <th>保险公司</th>
                                            <th>付款主体</th>
                                            <th>渠道</th>
                                            <th>联系电话</th>
                                            <th>被保险人</th>
                                            <th>被保险人证件号</th>
                                            <th>车牌号</th>
                                            <th>车主姓名</th>
                                            <th>险种</th>
                                            <th>商业险保费(元)</th>
                                            <th>交强险保费(元)</th>
                                            <th>车船税(元)</th>
                                            <th>全保费(元)</th>
                                            <th>下单日期</th>
                                            <th>渠道返点</th>
                                            <th>返佣费(元)</th>
                                            <th>付款日期</th>
                                            <th>操作</th>
                                        </tr>
                                        </thead>
                                    </table>
                                </section>
                            </div>
                            <!-- iframe -->
                            <div id="tab3" class="tab-pane fade">
                                <div id="iframeParent">
                                    <iframe width="100%" height="100%" frameborder="0" id="iframe"
                                            scrolling="no"></iframe>
                                </div>
						<!-- 提示框 -->
                            </div>
                            
                            <div class="modal fade" id="modal-dialog2">
                                    <div class="modal-dialog modal-sm">
                                        <div class="modal-content">
                                            <div class="modal-header">
                                                <button type="button" class="close" data-dismiss="modal"
                                                        aria-hidden="true">×
                                                </button>
                                                <h4 class="modal-title">取消内容</h4>
                                            </div>
                                            <div class="modal-body">
                                                当前填写内容未提交,确认取消?
                                            </div>
                                            <div class="modal-footer">
                                                <a href="javascript:;" onclick="showTab()"
                                                   class="btn btn-primary" data-dismiss="modal">确定</a>
                                                <a href="javascript:;" class="btn btn-default"
                                                   data-dismiss="modal">取消</a>
                                            </div>
                                        </div>
                                    </div>
                                </div>                            
                            <!-- 审核 -->
                            <div id="tab4" class="tab-pane fade">
                                <div>
                                    <h4>投保客户信息</h4>
                                    <div class="form-horizontal">
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">保单号：</label>
                                            <div class="col-sm-10">
                                                <p class="form-control-static">${orderInfo.ordNum}</p>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">车主：</label>
                                            <div class="col-sm-10">
                                                <p class="form-control-static">${orderInfo.carOwner}</p>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">车牌号：</label>
                                            <div class="col-sm-10">
                                                <p class="form-control-static">${orderInfo.plateNum}</p>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">车架号：</label>
                                            <div class="col-sm-10">
                                                <p class="form-control-static">${orderInfo.engineNum}</p>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">车辆种类：</label>
                                            <div class="col-sm-10">
                                                <p class="form-control-static">
                                                    <c:choose>
                                                        <c:when test="${orderInfo.vehicleType == 1}">客车</c:when>
                                                        <c:when test="${orderInfo.vehicleType == 2}">货车</c:when>
                                                    </c:choose>
                                                </p>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">被保险人：</label>
                                            <div class="col-sm-10">
                                                <p class="form-control-static">${orderInfo.insurant}</p>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">被保险人身份证号/<br>组织机构代码：</label>
                                            <div class="col-sm-10">
                                                <p class="form-control-static">${orderInfo.orgIdCode}</p>
                                            </div>
                                        </div>
                                        <c:if test="${orderInfo.typeInvestment == 1}">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">前保险公司：</label>
                                                <div class="col-sm-10">
                                                    <p class="form-control-static">${orderInfo.preInsyrer}</p>
                                                </div>
                                            </div>
                                        </c:if>
                                        <c:if test="${orderInfo.typeInvestment == 0}">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">发动机号：</label>
                                                <div class="col-sm-10">
                                                    <p class="form-control-static">${orderInfo.engineNum}</p>
                                                </div>
                                            </div>
                                        </c:if>
                                    </div>
                                </div>
                                <div>
                                    <h4>保险信息</h4>
                                    <div class="form-horizontal">
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">保险公司：</label>
                                            <div class="col-sm-10">
                                                <p class="form-control-static">${orderInfo.insyrerName}</p>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">险种：</label>
                                            <div class="col-sm-10">
                                                <c:choose>
                                                    <c:when test="${orderInfo.typeInsurance==0}">
                                                        <p class="form-control-static">交强险</p>
                                                    </c:when>
                                                    <c:when test="${orderInfo.typeInsurance==1}">
                                                        <p class="form-control-static">商业险</p>
                                                    </c:when>
                                                </c:choose>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">保险期限：</label>
                                            <div class="col-sm-10">
                                                <p class="form-control-static">${orderInfo.insureStartDate}至${orderInfo.insureEndDate}</p>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">垫资类型：</label>
                                            <div class="col-sm-10">
                                                <c:choose>
                                                    <c:when test="${orderInfo.typeInsurance2==1}">
                                                        <p class="form-control-static">不垫资</p>
                                                    </c:when>
                                                    <c:when test="${orderInfo.typeInsurance2==2}">
                                                        <p class="form-control-static">垫返点</p>
                                                    </c:when>
                                                    <c:when test="${orderInfo.typeInsurance2==3}">
                                                        <p class="form-control-static">垫保费</p>
                                                    </c:when>
                                                </c:choose>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="col-sm-2 control-label">垫资账期：</label>
                                            <div class="col-sm-10">
                                                <p class="form-control-static">${orderInfo.laonAccount} 天</p>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="panel-body panel-form">
                                    <form class="form-horizontal" data-parsley-validate="true" name="form-wizard"
                                          id="chackOrderForm" onsubmit="return false">
                                        <div class="wizard-step-1">
                                            <div class="form-group">
                                                <label class="control-label col-sm-2">付款主体：</label>
                                                <div class="col-md-4">
                                                    <select class="form-control" id="themeKey2" name="themeKey"
                                                            onchange="reCalRebateRate()"
                                                            data-parsley-group="wizard-step-1"
                                                            data-parsley-required="true"
                                                            data-parsley-required-message="付款主体必填">
                                                        <option value="">请选择</option>
                                                        <c:forEach var="theme" items="${payThemeList }">
                                                            <option value="${theme.riskKey}">${theme.riskValue}</option>
                                                        </c:forEach>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <c:choose>
                                                    <c:when test="${orderInfo.typeInsurance==0}">
                                                        <label class="control-label col-sm-2">交强险保费：</label>
                                                    </c:when>
                                                    <c:otherwise>
                                                        <label class="control-label col-sm-2">商业险保费：</label>
                                                    </c:otherwise>
                                                </c:choose>
                                                <div class="col-md-4">
                                                    <div class="input-group">
                                                        <input class="form-control" type="text"
                                                               onblur="calcAllPremium(${orderInfo.typeInsurance})"
                                                               id="insurance" name="premium"
                                                               onchange="reCalRebateRate()"
                                                               data-parsley-group="wizard-step-1"
                                                               data-parsley-required="true"
                                                               data-parsley-required-message="保费必填"
                                                               data-parsley-money="true"
                                                               data-parsley-money-message="数字格式不正确"/>
                                                        <div class="input-group-addon">元</div>
                                                    </div>
                                                </div>
                                            </div>
                                            <c:choose>
                                                <c:when test="${orderInfo.typeInsurance==0}">
                                                    <div class="form-group">
                                                        <label class="control-label col-sm-2"
                                                               for="vehicleTex">车船税：</label>
                                                        <div class="col-md-4">
                                                            <div class="input-group">
                                                                <input class="form-control" type="text"
                                                                       onblur="calcAllPremium(${orderInfo.typeInsurance})"
                                                                       id="vehicleTex" name="vehicleTex"
                                                                       onchange="reCalRebateRate()"
                                                                       data-parsley-group="wizard-step-1"
                                                                       data-parsley-required="true"
                                                                       data-parsley-required-message="车船税必填"
                                                                       data-parsley-money="true"
                                                                       data-parsley-money-message="数字格式不正确"/>
                                                                <div class="input-group-addon">元</div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </c:when>
                                            </c:choose>
                                            <div class="form-group">
                                                <c:choose>
                                                    <c:when test="${orderInfo.typeInsurance==0}">
                                                        <label class="control-label col-sm-2"
                                                               for="followTicketPoint">交强险跟单点位：</label>
                                                    </c:when>
                                                    <c:otherwise>
                                                        <label class="control-label col-sm-2"
                                                               for="followTicketPoint">商业险跟单点位：</label>
                                                    </c:otherwise>
                                                </c:choose>
                                                <div class="col-md-4">
                                                    <div class="input-group">
                                                        <input class="form-control" type="text" id="followTicketPoint"
                                                               name="followPoint" onchange="reCalRebateRate()"
                                                               data-parsley-group="wizard-step-1"
                                                               data-parsley-required="true"
                                                               data-parsley-required-message="跟单点位必填"
                                                               data-parsley-point="true"
                                                               data-parsley-point-message="数字格式不正确"/>
                                                        <div class="input-group-addon">%</div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <c:choose>
                                                    <c:when test="${orderInfo.typeInsurance==0}">
                                                        <label class="control-label col-sm-2"
                                                               for="supplementPoint">交强险补单点位：</label>
                                                    </c:when>
                                                    <c:otherwise>
                                                        <label class="control-label col-sm-2"
                                                               for="supplementPoint">商业险补单点位：</label>
                                                    </c:otherwise>
                                                </c:choose>
                                                <div class="col-md-4">
                                                    <div class="input-group">
                                                        <input class="form-control" type="text" id="supplementPoint"
                                                               name="supplementPoint" onchange="reCalRebateRate()"
                                                               data-parsley-group="wizard-step-1"
                                                               data-parsley-required="true"
                                                               data-parsley-required-message="补单点位必填"
                                                               data-parsley-point="true"
                                                               data-parsley-point-message="数字格式不正确"/>
                                                        <div class="input-group-addon">%</div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="control-label col-sm-2">&nbsp;</label>
                                                <div class="col-md-4">
                                                    <button type="button" id="calcRebateRateButton"
                                                            onclick="calcRebateRate()"
                                                            class="btn btn-primary m-r-10">计算保费
                                                    </button>
                                                    <button type="button" id="resetOrderOne" onclick="resetOrder(1)"
                                                            class="btn btn-default">驳回
                                                    </button>
                                                </div>
                                            </div>
                                        </div>
                                        <div id="costTotal" class="hidden">
                                            <h3>费用合计</h3>
                                            <div class="form-group">
                                                <label class="control-label col-sm-2">全保费：</label>
                                                <div class="col-md-4">
                                                    <div class="input-group">
                                                        <input class="form-control" type="text" readonly="readonly"
                                                               id="allPremiumSpan"/>
                                                        <div class="input-group-addon">元</div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="control-label col-sm-2">税后保费：</label>
                                                <div class="col-md-4">
                                                    <div class="input-group">
                                                        <input class="form-control" type="text" readonly="readonly"
                                                               id="texPremiumSpan"/>
                                                        <div class="input-group-addon">元</div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="control-label col-sm-2">参考渠道返点：</label>
                                                <div class="col-md-4">
                                                    <div class="input-group">
                                                        <input class="form-control" type="text" readonly="readonly"
                                                               id="channelLookPointSpan"/>
                                                        <div class="input-group-addon">%</div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="control-label col-sm-2"
                                                       for="channelPoint">渠道返点：</label>
                                                <div class="col-md-4">
                                                    <div class="input-group">
                                                        <input class="form-control" type="text" id="channelPoint"
                                                               name="channelPoint" onblur="calRebateFee()"
                                                               data-parsley-required="true"
                                                               data-parsley-required-message="渠道返点必填"
                                                               data-parsley-point="true"
                                                               data-parsley-point-message="数字格式不正确"/>
                                                        <div class="input-group-addon">%</div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="control-label col-sm-2"
                                                       for="channelRebateFee">渠道返佣费：</label>
                                                <div class="col-md-4">
                                                    <div class="input-group">
                                                        <input class="form-control" type="text" readonly="readonly"
                                                               id="channelRebateFee"/>
                                                        <div class="input-group-addon">元</div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="control-label col-sm-2">渠道应支付保费：</label>
                                                <div class="col-md-4">
                                                    <div class="input-group">
                                                        <input class="form-control" type="text" readonly="readonly"
                                                               id="channelPayPremiumSpan"/>
                                                        <div class="input-group-addon">元</div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="control-label col-sm-2">审核意见：</label>
                                                <div class="col-md-4">
                                        <textarea class="form-control" id="remark1" name="remark"
                                                  rows="4"
                                                  data-parsley-group="wizard-step-2"
                                                  data-parsley-required="true"
                                                  data-parsley-required-message="审核意见必填"
                                                  data-parsley-maxlength="100"
                                                  data-parsley-maxlength-message="审核意见的最大长度是100"
                                                  placeholder=""></textarea>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="control-label col-sm-2">&nbsp;</label>
                                                <div class="col-md-4">
                                                    <a type="button" id="passButton" onclick="passOrder()"
                                                            class="btn btn-primary m-r-10">
                                                        通过
                                                    </a>
                                                    <button type="button" id="resetOrderTwo" onclick="resetOrder(2)"
                                                            class="btn btn-default">驳回
                                                    </button>
                                                </div>
                                            </div>
                                        </div>
                                        <input name="tid" id="checkOrderId" value="${orderInfo.tid}" hidden/>
                                        <input id="productId" name="productId" value="${orderInfo.productId}" hidden/>
                                        <input id="typeInsurance2" value="${orderInfo.typeInsurance2}" hidden/>
                                        <input id="allPremiumInput" name="allPremium" hidden/>
                                        <input id="channelPayPremiumInput" name="channelPayPremium" hidden/>
                                        <input id="texPremiumInput" name="texPremium" hidden/>
                                        <input id="channelLookPointInput" name="channelLookPoint" hidden/>
                                        <input id="channelRebateFeeInput" name="channelRebateFee" hidden/>
                                    </form>
                                </div>
                            </div>
                            <!-- 支付 -->
                            <div id="tab5" class="tab-pane fade">
                                <h4>投保客户信息</h4>
                                <div class="form-horizontal">
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">保单号：</label>
                                        <div class="col-sm-10">
                                            <p class="form-control-static">${orderInfo.ordNum}</p>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">车主：</label>
                                        <div class="col-sm-10">
                                            <p class="form-control-static">${orderInfo.carOwner}</p>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">车牌号：</label>
                                        <div class="col-sm-10">
                                            <p class="form-control-static">${orderInfo.plateNum}</p>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">车架号：</label>
                                        <div class="col-sm-10">
                                            <p class="form-control-static">${orderInfo.engineNum}</p>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">车辆种类：</label>
                                        <div class="col-sm-10">
                                            <p class="form-control-static">
                                                <c:choose>
                                                    <c:when test="${orderInfo.vehicleType == 1}">客车</c:when>
                                                    <c:when test="${orderInfo.vehicleType == 2}">货车</c:when>
                                                </c:choose>
                                            </p>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">被保险人：</label>
                                        <div class="col-sm-10">
                                            <p class="form-control-static">${orderInfo.insurant}</p>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">被保险人身份证号/<br>组织机构代码：</label>
                                        <div class="col-sm-10">
                                            <p class="form-control-static">${orderInfo.orgIdCode}</p>
                                        </div>
                                    </div>
                                </div>
                                <h4>保险信息</h4>
                                <div class="form-horizontal">
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">保险公司：</label>
                                        <div class="col-sm-10">
                                            <p class="form-control-static">${orderInfo.insyrerName}</p>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">险种：</label>
                                        <div class="col-sm-10">
                                            <c:choose>
                                                <c:when test="${orderInfo.typeInsurance==0}">
                                                    <p class="form-control-static">交强险</p>
                                                </c:when>
                                                <c:when test="${orderInfo.typeInsurance==1}">
                                                    <p class="form-control-static">商业险</p>
                                                </c:when>
                                            </c:choose>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">保单生效日期：</label>
                                        <div class="col-sm-10">
                                            <p class="form-control-static">${orderInfo.datePolicy}</p>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">垫资类型：</label>
                                        <div class="col-sm-10">
                                            <c:choose>
                                                <c:when test="${orderInfo.typeInsurance2==1}">
                                                    <p class="form-control-static">不垫资</p>
                                                </c:when>
                                                <c:when test="${orderInfo.typeInsurance2==2}">
                                                    <p class="form-control-static">垫返点</p>
                                                </c:when>
                                                <c:when test="${orderInfo.typeInsurance2==3}">
                                                    <p class="form-control-static">垫保费</p>
                                                </c:when>
                                            </c:choose>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">垫资账期：</label>
                                        <div class="col-sm-10">
                                            <p class="form-control-static">${orderInfo.laonAccount} 天</p>
                                        </div>
                                    </div>
                                    <c:choose>
                                        <c:when test="${orderInfo.typeInsurance==0 }">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">交强险保费：</label>
                                                <div class="col-sm-10">
                                                    <p class="form-control-static">${orderInfo.pulsoryPremium}</p>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">车船税：</label>
                                                <div class="col-sm-10">
                                                    <p class="form-control-static">${orderInfo.vechcleVesselTax}</p>
                                                </div>
                                            </div>
                                        </c:when>
                                        <c:when test="${orderInfo.typeInsurance==1 }">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">商业险保费：</label>
                                                <div class="col-sm-10">
                                                    <p class="form-control-static">${orderInfo.mercialPremium}</p>
                                                </div>
                                            </div>
                                        </c:when>
                                    </c:choose>
                                    <c:choose>
                                        <c:when test="${orderInfo.typeInsurance==0 }">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">交强险跟单点位：</label>
                                                <div class="col-sm-10">
                                                    <p class="form-control-static">${orderInfo.followPoint}</p>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">交强险补单点位：</label>
                                                <div class="col-sm-10">
                                                    <p class="form-control-static">${orderInfo.replenishPoint}</p>
                                                </div>
                                            </div>
                                        </c:when>
                                        <c:when test="${orderInfo.typeInsurance==1 }">
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">商业险跟单点位：</label>
                                                <div class="col-sm-10">
                                                    <p class="form-control-static">${orderInfo.followPoint}</p>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">商业险补单点位：</label>
                                                <div class="col-sm-10">
                                                    <p class="form-control-static">${orderInfo.replenishPoint}</p>
                                                </div>
                                            </div>
                                        </c:when>
                                    </c:choose>
                                </div>
                                <h4>费用合计</h4>
                                <div class="form-horizontal">
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">全保费：</label>
                                        <div class="col-sm-10">
                                            <p class="form-control-static">${orderInfo.allPremium}</p>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">保险公司跟单手续费：</label>
                                        <div class="col-sm-10">
                                            <p class="form-control-static">${companyRecord.followRpoundage}</p>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">保险公司补单手续费：</label>
                                        <div class="col-sm-10">
                                            <p class="form-control-static">${companyRecord.replenishRpoundage}</p>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">税后保费：</label>
                                        <div class="col-sm-10">
                                            <p class="form-control-static">${orderInfo.texPremium}</p>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">渠道参考返点：</label>
                                        <div class="col-sm-10">
                                            <p class="form-control-static">${orderInfo.channelLookRebate}</p>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">渠道返点：</label>
                                        <div class="col-sm-10">
                                            <p class="form-control-static">${orderInfo.channelRebate}</p>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">渠道返佣费合计：</label>
                                        <div class="col-sm-10">
                                            <p class="form-control-static">${channelRecord.mustRebateAmt}</p>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">渠道应支付保费合计：</label>
                                        <div class="col-sm-10">
                                            <p class="form-control-static">${channelRecord.mustPremium}</p>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-2 control-label">付款主体：</label>
                                        <div class="col-sm-10">
                                            <c:choose>
                                                <c:when test="${orderInfo.paySubject ==1 }">
                                                    <p class="form-control-static">环宇康泰</p>
                                                </c:when>
                                                <c:when test="${orderInfo.paySubject ==2 }">
                                                    <p class="form-control-static">青岛盛达</p>
                                                </c:when>
                                                <c:when test="${orderInfo.paySubject ==3 }">
                                                    <p class="form-control-static">玉环天云</p>
                                                </c:when>
                                                <c:when test="${orderInfo.paySubject ==4 }">
                                                    <p class="form-control-static">汉龙</p>
                                                </c:when>
                                            </c:choose>
                                        </div>
                                    </div>
                                </div>
                                <br>
                                <div class="panel-body panel-form">
                                    <form class="form-horizontal" enctype="multipart/form-data"
                                          data-parsley-validate="true"
                                          name="demo-form" id="payOrderForm" onsubmit="return false">
                                        <c:if test="${orderInfo.typeInsurance2!=3}">
                                            <div class="form-group">
                                                <label class="control-label col-sm-2">收渠道金额：</label>
                                                <div class=" col-md-4">
                                                    <div class="input-group">
                                                        <input class="form-control" id="receiptChannel"
                                                               name="receiptChannel"
                                                               value="${channelRecord.mustPremium}"
                                                               data-parsley-required="true"
                                                               data-parsley-required-message="渠道金额必填"
                                                               data-parsley-money="true"
                                                               data-parsley-money-message="数字格式不正确"/>
                                                        <div class="input-group-addon">元</div>
                                                    </div>

                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="control-label col-sm-2">收款日期：</label>
                                                <div class="col-md-4">
                                                    <input class="form-control selectData" name="receiptDate"
                                                           data-parsley-required="true"
                                                           value="<fmt:formatDate value="${currTime}" pattern="yyyy-MM-dd"/>"
                                                           data-parsley-required-message="收款日期必填"/>
                                                </div>
                                            </div>
                                            <div class="form-group">
                                                <label class="control-label col-sm-2">收款凭证：</label>
                                                <div class="col-md-4">
                                                    <input class="form-control-static" type="file"
                                                           data-parsley-max-file-size="10240"
                                                           data-parsley-max-file-size-message="文件大小最大是10M"
                                                           data-parsley-file-type=".doc,.pdf,.jpg,.png"
                                                           data-parsley-file-type-message="文件格式不正确"
                                                           id="receiptFile" name="receiptFile"/>
                                                </div>
                                            </div>
                                        </c:if>
                                        <div class="form-group">
                                            <label class="control-label col-sm-2">付保险公司金额：</label>
                                            <div class="col-md-4">
                                                <div class="input-group">
                                                    <input class="form-control" id="payInsurer" name="payInsurer"
                                                           data-parsley-required="true"
                                                           data-parsley-required-message="保险公司金额必填"
                                                           data-parsley-money="true"
                                                           data-parsley-money-message="数字格式不正确"/>
                                                    <div class="input-group-addon">元</div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-sm-2">付款日期：</label>
                                            <div class="col-md-4">
                                                <input class="form-control selectData" type="text"
                                                       name="payDate"
                                                       value="<fmt:formatDate value="${currTime}" pattern="yyyy-MM-dd"/>"
                                                       data-parsley-required="true"
                                                       data-parsley-required-message="付款日期必填"/>
                                            </div>
                                        </div>
                                        <div class="form-group">
                                            <label class="control-label col-sm-2"
                                                   for="remark">备注：</label>
                                            <div class="col-md-4">
                                                <textarea class="form-control" id="remark" name="remark"
                                                          rows="4" data-parsley-maxlength="100"
                                                          data-parsley-maxlength-message="备注的最大长度是100"
                                                          placeholder=""></textarea>
                                            </div>
                                        </div>
                                        <input type="text" name="tid" hidden id="orderId" value="${orderInfo.tid}"/>
                                        <input type="text" id="payStatus" hidden name="payStatus" value="1"/>
                                        <div class="form-group">
                                            <label class="control-label col-sm-2">&nbsp;</label>
                                            <div class="col-md-4">
                                                <button type="button" class="btn btn-primary m-r-10"
                                                        onclick="passInsurer()">支付
                                                </button>
                                                <button type="button" class="btn btn-default" onclick="payCanel()">取消
                                                </button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                            <!-- 完善表单 -->
                            <div id="tab6" class="tab-pane fade">
                                <section class="pad-top-10 pad-bottom-20">
                                    <ul class="nav nav-pills">
                                        <li><a href="#tab11" data-toggle="tab">投保客户信息</a></li>
                                        <li><a href="#tab16" data-toggle="tab">保险信息</a></li>
                                        <li><a href="#tab17" data-toggle="tab">费用合计</a></li>
                                        <li><a href="#tab14" data-toggle="tab">财务支付信息</a></li>
                                        <li class="active"><a href="#tab15" data-toggle="tab">完善保单信息</a></li>
                                    </ul>
                                    <div <%--class="panel-body"--%>>
                                        <div class="table-responsive">
                                            <div class="form-wrap mar-bottom-0">
                                                <div class="tab-content">

                                                    <!-- 投保客户信息 -->
                                                    <div id="tab11" class="tab-pane fade">
                                                        <form class="form-horizontal form-bordered">
                                                            <section>
                                                                <div class="form-group">
                                                                    <label class="col-md-1 control-label">保单号:</label>
                                                                    <div class="col-md-2">
                                                                        <p class="form-control-static">${order.ordNum }</p>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label class="col-md-1 control-label">车主:</label>
                                                                    <div class="col-md-2">
                                                                        <p class="form-control-static">${order.carOwner }</p>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label class="col-md-1 control-label">车牌号:</label>
                                                                    <div class="col-md-2">
                                                                        <p class="form-control-static">${order.plateNum }</p>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label class="col-md-1 control-label">车架号:</label>
                                                                    <div class="col-md-2">
                                                                        <p class="form-control-static">${order.frameNumber }</p>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label class="col-md-1 control-label">车辆种类:</label>
                                                                    <div class="col-md-2">
                                                                        <c:if test="${order.vehicleType==1 }">
                                                                            <p class="form-control-static">客车</p>
                                                                        </c:if>
                                                                        <c:if test="${order.vehicleType==2 }">
                                                                            <p class="form-control-static">货车</p>
                                                                        </c:if>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label class="col-md-1 control-label">被保险人:</label>
                                                                    <div class="col-md-2">
                                                                        <p class="form-control-static">${order.insurant }</p>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label class="col-md-1 control-label">被保险人身份证号/组织机构代码:</label>
                                                                    <div class="col-md-2">
                                                                        <p class="form-control-static">${order.orgIdCode }</p>
                                                                    </div>
                                                                </div>
                                                            </section>
                                                        </form>
                                                    </div>


                                                    <!-- 保险信息 -->
                                                    <div id="tab16" class="tab-pane fade">
                                                        <form class="form-horizontal form-bordered">
                                                            <section>
                                                                <div class="form-group">
                                                                    <label class="col-md-1 control-label">保险公司:</label>
                                                                    <div class="col-md-2">
                                                                        <p class="form-control-static">${order.insyrerName }</p>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label class="col-md-1 control-label">险种:</label>
                                                                    <div class="col-md-2">
                                                                        <c:choose>
                                                                            <c:when test="${order.typeInsurance==0 }">
                                                                                <p class="form-control-static">交强险</p>
                                                                            </c:when>
                                                                            <c:otherwise>
                                                                                <p class="form-control-static">商业险</p>
                                                                            </c:otherwise>
                                                                        </c:choose>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label class="col-md-1 control-label">保单生效日期:</label>
                                                                    <div class="col-md-2">
                                                                        <p class="form-control-static">${order.dateIssuance }</p>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label class="col-md-1 control-label">垫资类型:</label>
                                                                    <div class="col-md-2">
                                                                        <c:if test="${order.typeInsurance2==1 }">
                                                                            <p class="form-control-static">不垫资</p>
                                                                        </c:if>
                                                                        <c:if test="${order.typeInsurance2==2 }">
                                                                            <p class="form-control-static">垫返点</p>
                                                                        </c:if>
                                                                        <c:if test="${order.typeInsurance2==3 }">
                                                                            <p class="form-control-static">垫保费</p>
                                                                        </c:if>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label class="col-md-1 control-label">垫资账期:</label>
                                                                    <div class="col-md-2">
                                                                        <p class="form-control-static">${order.laonAccount }天</p>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label class="col-md-1 control-label">保险费:</label>
                                                                    <div class="col-md-2">
                                                                        <c:choose>
                                                                            <c:when test="${order.typeInsurance==0 }">
                                                                                <p class="form-control-static">${order.pulsoryPremium }元</p>
                                                                            </c:when>
                                                                            <c:otherwise>
                                                                                <p class="form-control-static">${order.mercialPremium }元</p>
                                                                            </c:otherwise>
                                                                        </c:choose>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                    								<label class="col-md-1 control-label">保险公司返点:</label>
                                    									<div class="col-md-2">
                                    									  <c:choose>
                                      										<c:when test="${order.typeInsurance==0 }">
                                        										<p class="form-control-static">交强险跟单点位:${order.followPoint }%</p>
                                        										<p class="form-control-static">交强险补单点位:${order.replenishPoint }%</p>
                                      										</c:when>
                                      										<c:otherwise>
                                      											<p class="form-control-static">商业险跟单点位:${order.followPoint }%</p>
                                        										<p class="form-control-static">商业险补单点位:${order.replenishPoint }%</p>
                                      										</c:otherwise>
                                      									  </c:choose>
                                    									</div>
                                								</div>
                                                            </section>
                                                        </form>
                                                    </div>


                                                    <!-- 费用合计 -->
                                                    <div id="tab17" class="tab-pane fade">
                                                        <form class="form-horizontal form-bordered">
                                                            <section>
                                                                <div class="form-group">
                                                                    <label class="col-md-1 control-label">全保费:</label>
                                                                    <div class="col-md-2">
                                                                        <p class="form-control-static">${order.allPremium }元</p>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label class="col-md-1 control-label">渠道应支付保费合计:</label>
                                                                    <div class="col-md-2">
                                                                        <p class="form-control-static">${channelRecord.mustPremium }元</p>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label class="col-md-1 control-label">保险公司跟单手续费:</label>
                                                                    <div class="col-md-2">
                                                                        <p class="form-control-static">${companyRecord.followRpoundage }元</p>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label class="col-md-1 control-label">保险公司补点手续费:</label>
                                                                    <div class="col-md-2">
                                                                        <p class="form-control-static">${companyRecord.replenishRpoundage }元</p>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label class="col-md-1 control-label">税后保费:</label>
                                                                    <div class="col-md-2">
                                                                        <p class="form-control-static">${order.texPremium }元</p>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label class="col-md-1 control-label">渠道返点:</label>
                                                                    <div class="col-md-2">
                                                                        <p class="form-control-static">${order.channelRebate }%</p>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label class="col-md-1 control-label">渠道返佣费合计:</label>
                                                                    <div class="col-md-2">
                                                                        <p class="form-control-static">${channelRecord.mustRebateAmt }元</p>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label class="col-md-1 control-label">付款主体:</label>
                                                                    <div class="col-md-2">
                                                                        <p class="form-control-static">
                                                                            <c:if test="${order.paySubject==1 }">
                                                                                环宇康泰
                                                                            </c:if>
                                                                            <c:if test="${order.paySubject==2 }">
                                                                                青岛盛达
                                                                            </c:if>
                                                                            <c:if test="${order.paySubject==3 }">
                                                                                玉环天云
                                                                            </c:if>
                                                                            <c:if test="${order.paySubject==4 }">
                                                                                汉龙
                                                                            </c:if>
                                                                        </p>
                                                                    </div>
                                                                </div>
                                                            </section>
                                                        </form>
                                                    </div>


                                                    <!-- 财务支付信息 -->
                                                    <div id="tab14" class="tab-pane fade">
                                                        <form class="form-horizontal form-bordered">
                                                            <section>
                                                                <div class="form-group">
                                                                    <label class="col-md-1 control-label">收渠道金额:</label>
                                                                    <div class="col-md-2">
                                                                        <p class="form-control-static">${channelRecord.mustPremium }元</p>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label class="col-md-1 control-label">收款日期:</label>
                                                                    <div class="col-md-2">
                                                                        <p class="form-control-static">${channelRecord.receiptDate }</p>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label class="col-md-1 control-label">收款凭证:</label>
                                                                    <div class="col-md-2">
                                                                        <p class="form-control-static"><a onclick="viewPage('${attachment.url}')">${attachment.name}</a>
                                                                        </p>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label class="col-md-1 control-label">付保险公司金额:</label>
                                                                    <div class="col-md-2">
                                                                        <p class="form-control-static">${companyRecord.mustPremium }元</p>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label class="col-md-1 control-label">付保险公司日期:</label>
                                                                    <div class="col-md-2">
                                                                        <p class="form-control-static">${companyRecord.payDate }</p>
                                                                    </div>
                                                                </div>
                                                            </section>
                                                        </form>
                                                    </div>


                                                    <!-- 完善保单信息 -->
                                                    <div id="tab15" class="tab-pane fade active in">
                                                        <form class="form-horizontal form-bordered" id="form"
                                                              method="post"
                                                              data-parsley-validate="true">
                                                            <input type="hidden" value="${order.typeInsurance2 }"
                                                                   name="typeInsurance2">
                                                            <input type="hidden" value="${ordCode }" name="ordCode">
                                                            <input type="hidden" value="${order.tid }" name="tid">
                                                            <div class="form-group">
                                                                <label class="control-label col-md-4 col-sm-4">保单号：</label>
                                                                <div class="col-md-6 col-sm-6">
                                                                    <input type="hidden"
                                                                           value="${insurer.policyNumber }"
                                                                           id="Innumber">
                                                                    <input type="text" value="${insurer.policyNumber }"
                                                                           id="ordNum" class="form-control"
                                                                           name="ordNum" data-parsley-inlength="true"
                                                                           data-parsley-inlength-message="请输入正确保单号"
                                                                           data-parsley-required="true"
                                                                           data-parsley-required-message="保单号不能为空"
                                                                           data-parsley-only="true"
                                                                           data-parsley-only-message="该保单号已被使用">
                                                                </div>
                                                            </div>
                                                            <div class="form-group">
                                                                <label class="control-label col-md-4 col-sm-4">出单员：</label>
                                                                <div class="col-md-6 col-sm-6">
                                                                    <select style="list-style-type: none;"
                                                                            class="form-control" name="saleman"
                                                                            data-parsley-required="true"
                                                                            data-parsley-required-message="出单员不能为空">
                                                                        <option value="">请选择</option>
                                                                        <c:forEach items="${userList }" var="user">
                                                                            <option value="${user.tid }">${user.username }</option>
                                                                        </c:forEach>
                                                                    </select>
                                                                </div>
                                                            </div>
                                                            <div class="form-group">
                                                                <label class="control-label col-md-4 col-sm-4">出单日期：</label>
                                                                <div class="col-md-6 col-sm-6">
                                                                    <input type="text" id="dateIssuance"
                                                                           name="dateIssuance"
                                                                           class="form-control selectData"
                                                                           data-parsley-required="true"
                                                                           data-parsley-required-message="出单日期不能为空">
                                                                </div>
                                                            </div>
                                                            <div class="form-group">
                                                                <label class="control-label col-md-4 col-sm-4">保单生效日期：</label>
                                                                <div class="col-md-6 col-sm-6">
                                                                    <input type="text" onchange="updateTime()"
                                                                           id="datePolicy"
                                                                           value="${order.insureStartDate }"
                                                                           name="datePolicy"
                                                                           class="form-control selectData"
                                                                           data-parsley-required="true"
                                                                           data-parsley-required-message="保单生效日期不能为空">
                                                                </div>
                                                            </div>
                                                            <div class="form-group">
                                                                <label class="control-label col-md-4 col-sm-4">保单失效日期：</label>
                                                                <div class="col-md-6 col-sm-6">
                                                                    <input type="text" value="${order.insureEndDate }"
                                                                           id="expireDate" name="expireDate"
                                                                           class="form-control selectData"
                                                                           data-parsley-required="true"
                                                                           data-parsley-required-message="保单失效日期不能为空">
                                                                </div>
                                                            </div>
                                                            <div class="form-group">
                                                                <label class="control-label col-md-4 col-sm-4">&nbsp;</label>
                                                                <div class="col-md-6 col-sm-6">
                                                                    <button type="button" id="showTab"
                                                                            class="btn btn-primary m-r-10">&nbsp;提交&nbsp;
                                                                    </button>
                                                                    <a href="#modal-dialog2" class="btn btn-default"
                                                                       data-toggle='modal'>&nbsp;取消&nbsp;</a>
                                                                </div>
                                                            </div>
                                                        </form>
                                                    </div>

                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </section>
                            </div>
                        </div>
                    </section>
                </div>
            </div>
        </div>
        <table class="bg-warning" id="orderOperateRecords">
            <thead>
            <tr>
                <th>操作记录</th>
                <th>操作人</th>
                <th>操作时间</th>
                <th>备注</th>
            </tr>
            </thead>
            <tbody>
            <c:forEach items="${optionList}" var="opt">
                <tr>
                    <td>${opt.content}</td>
                    <td>${opt.createUser.roleName}(${opt.createUser.realName})</td>
                    <td><javatime:format value="${opt.createAt}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
                    <td>${opt.remark}</td>
                </tr>
            </c:forEach>
            </tbody>
        </table>
    </div>
</div>
<%--下载提示框--%>
<div class="modal fade" id="needpaid" style="display: none;">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">温馨提示</h4>
            </div>
            <div class="modal-body">
                确认下载当前列表信息
            </div>
            <div class="modal-footer">
                <button type="button" onclick="needpaid1()" class="btn btn-primary">确定</button>
                <a href="javascript:;" class="btn btn-default" data-dismiss="modal">取消</a>
            </div>
        </div>
    </div>
</div>
<!-- 应收渠道列表结算提示框 -->
<div class="modal fade" id="dwchannel" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" style="width: 380px">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h5 class="modal-title">结算</h5>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" data-parsley-validate="true" name="demo-form" id="payChannelRebateAmt">
                    <input id="tid" hidden name="tid">
                    <section class="form-horizontal">
                        <div class="form-group">
                            <label class="col-md-4 control-label">付返佣费日期 :</label>
                            <div class="col-sm-6">
                                <input type="text" value="<C:formatDate value="${currTime}" pattern="yyyy-MM-dd"/>"
                                       class="form-control datepicker-default" name="payDate"
                                       data-parsley-required="true" data-parsley-required-message="付返佣费日期必填"
                                       data-parsley-pattern="^[1-9][0-9]{3}-(0[1-9]|1[0-2])-([0-2][1-9]|3[0-1])$"
                                       data-parsley-pattern-message="请输入yyyy-MM-dd格式的日期"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-4" for="channelRebateAmt">付返佣费金额:</label>
                            <div class="col-sm-6">
                                <div class="input-group">
                                    <input class="form-control" type="text" id="channelRebateAmt"
                                           name="channelRebateFee" data-parsley-required="true"
                                           data-parsley-required-message="返佣费金额必填" data-parsley-money="true"
                                           data-parsley-money-message="数字格式不正确" placeholder=""
                                           onchange="updateCheckout()"/>
                                    <div class="input-group-addon">元</div>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-md-4">备注:</label>
                            <div class="col-sm-6">
                                <textarea class="form-control" id="remark2" rows="4"
                                          data-parsley-maxlength="100" data-parsley-maxlength-message="备注最大长度是100"
                                          placeholder=""></textarea>
                            </div>
                        </div>
                        <input type="hidden" id="channelMustRebateAmt">
                    </section>
                </form>
            </div>
            <div class="modal-footer">
                <a href="javascript:;" class="btn btn-white" data-dismiss="modal">取消</a>
                <a href="javascript:;" class="btn btn-success" onclick="payChannel()">确定</a>
            </div>
        </div>
    </div>
</div>
<!-- 审核直接驳回提示框 -->
<div class="modal fade" id="directReset1">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">审核驳回</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" data-parsley-validate="true" name="demo-form" id="resetOrderCheck">
                    <div class="form-group">
                        <label class="control-label col-md-4">审核意见:</label>
                        <div class="col-sm-6">
                            <textarea class="form-control" rows="4" id="checkMsg1"
                                      data-parsley-required="true" data-parsley-required-message="审核意见必填"
                                      data-parsley-maxlength="100" data-parsley-maxlength-message="审核意见最大长度是100" placeholder=""></textarea>
                        </div>
                    </div>
                    </section>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" onclick="insureReset(1)">确定</button>
                <a href="javascript:;" class="btn btn-default" data-dismiss="modal">取消</a>
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id="directReset4">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">温馨提示</h4>
            </div>
            <div class="modal-body">
               确认审核驳回
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" onclick="insureReset(2)">确定</button>
                <a href="javascript:;" class="btn btn-default" data-dismiss="modal">取消</a>
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id="directReset5">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">温馨提示</h4>
            </div>
            <div class="modal-body">
                确认审核通过
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" onclick="insurePassOrder()">确定</button>
                <a href="javascript:;" class="btn btn-default" data-dismiss="modal">取消</a>
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id="directReset6">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">温馨提示</h4>
            </div>
            <div class="modal-body">
                确认支付
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" onclick="surePay()">确定</button>
                <a href="javascript:;" class="btn btn-default" data-dismiss="modal">取消</a>
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id="directReset7">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">温馨提示</h4>
            </div>
            <div class="modal-body">
                当前填写内容未提交，确认取消
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" onclick="surePayCancel()">确定</button>
                <a href="javascript:;" class="btn btn-default" data-dismiss="modal">取消</a>
            </div>
        </div>
    </div>
</div>
<!-- 审核计算保费失败提示框 -->
<div class="modal fade" id="directReset2">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">温馨提示</h4>
            </div>
            <div class="modal-body" id="checkShowInfo">
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" id="insure" data-dismiss="modal">确定</button>
                <a href="javascript:;" class="btn btn-default" id="cancal" data-dismiss="modal">取消</a>
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id="directReset3">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">温馨提示</h4>
            </div>
            <div class="modal-body" id="checkShowInfo1">
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary" onclick="reloadHtml()" data-dismiss="modal">确定</button>
                <a href="javascript:;" class="btn btn-default" onclick="reloadHtml()" data-dismiss="modal">取消</a>
            </div>
        </div>
    </div>
</div>
<!--支付操作提示框-->
<div class="modal fade" id="modal-dialogs_one">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title">温馨提示</h4>
            </div>
            <div class="modal-body" id="me1">
            </div>
            <div class="modal-footer">
                <a href="javascript:;" id="continuePay" class="btn btn-primary hidden" onclick="continueOperate(2)">继续支付</a>
                <a href="javascript:;" id="payFail" class="btn btn-default hidden" onclick="continueOperate(1)">支付失败</a>
                <a href="javascript:;" id="confirm" class="btn btn-primary hidden" onclick="continueOperate(4)" data-dismiss="modal">确定</a>
                <a href="javascript:;" id="cancel" class="btn btn-default hidden" onclick="continueOperate(3)" data-dismiss="modal">取消</a>
            </div>
        </div>
    </div>
</div>
<!-- 完善订单提示框 -->
<div class="modal fade" id="modal-dialog2">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"
                        aria-hidden="true">×
                </button>
                <h4 class="modal-title">取消内容</h4>
            </div>
            <div class="modal-body">
                当前填写内容未提交,确认取消?
            </div>
            <div class="modal-footer">
                <a href="javascript:;" onclick="showTab()"
                   class="btn btn-primary" data-dismiss="modal">确定</a>
                <a href="javascript:;" class="btn btn-default"
                   data-dismiss="modal">取消</a>
            </div>
        </div>
    </div>
</div>
<jsp:include page="../common/footer.jsp"/>
<script src="${ctx}/static/js/order/pay_order_list.js"></script>
</body>
<script>

	function viewPage(url){
    	window.open(url);
	}

    function showTab() {
        $("#perfect").addClass("hidden");
        $('#modal-dialog2').modal('hide')
        $("#tab").trigger("click");
    }
    function updateCheckout() {
        var channelMustRebateAmt = $("#channelMustRebateAmt").val();
        var channelRebateAmt = $("#channelRebateAmt").val();
        if (channelMustRebateAmt && channelMustRebateAmt == channelRebateAmt) {
            $("#remark2").removeAttrs("data-parsley-required");
            $("#remark2").removeAttrs("data-parsley-required-message");
        } else {
            $("#remark2").attr("data-parsley-required", "true");
            $("#remark2").attr("data-parsley-required-message", "返佣费变更，备注必填");
        }
    }
</script>
</html>
